# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tau
pkgver=0.12.0
# Gitlab puts the sha of the download in the URL...
_sha=14037a7f98f475d2497b74bd74a0430e
pkgrel=1
pkgdesc="GTK frontend for the Xi text editor, written in Rust"
url="https://gitlab.gnome.org/World/Tau"
# ppc64le and armv7 SIGSEVs Rust
# s390x fails to build
# x86 fails to build
# riscv64: rust broken
arch="all !ppc64le !x86 !armv7 !s390x !riscv64"
license="MIT"
makedepends="
	cargo
	gtk+3.0-dev
	libhandy-dev
	meson
	vte3-dev
	"
checkdepends="
	appstream-glib
	desktop-file-utils
	"
options="!check" # Rust doesn't like to compile these on musl
subpackages="$pkgname-lang"
source="https://gitlab.gnome.org/World/Tau/uploads/$_sha/tau-$pkgver.tar.xz
	meson-0.60.patch
	"


build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
65055107f7b0cbed8585300bae3f5afd16f21c4df655f5e4b12538ddfc4e4db48ca4627da15f19e3a895c609c18f15eedd5a67237fa1aeed683952fa4739fdaa  tau-0.12.0.tar.xz
24e3e03381626539789160a372c85d70abfe60c932bbad308e15cb18f8f9f0d2169e07399df12c306b277ec192d0bd832474ae209dcfaa1b14c0c6aff1d07e37  meson-0.60.patch
"
